package arena.rechner;
/*
 * BerechnungsKlasse.java
 *
 * Created on 16. November 2007, 19:49
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

/**
 *
 * @author Stefan Schoof , enkidu
 */
public class BerechnungsKlasse {
    
    private double num1 = 0.0;
    private double punkte = 0.0;
    private double result2 = 0.0;
    private double result3 = 0.0;
    private double result5 = 0.0;    
    
    /** Creates a new instance of BerechnungsKlasse */
    public BerechnungsKlasse(String uWertung) {
        num1 = Float.parseFloat(uWertung);
        berechne();
    }
    
    public void berechne() {
        if ( num1 <= 1500 ) {
            punkte = (0.22 * num1 + 14);
        }

        else {
            punkte = 1511.26 / (1 + 1639.28 * Math.pow(2.71828, -0.00412 * num1));
        }    
        
        result2 = punkte*0.76;
        result3 = punkte*0.88;
        result5 = punkte;        
    }
    
    public String getZweiVsZwei() {
        result2 = Math.floor(result2);        
        return String.valueOf(result2);
    }
    
    public String getDreiVsDrei() {
        result3 = Math.floor(result3);                
        return String.valueOf(result3);        
    }
    
    public String getFuenfVsFuenf() {
        result5 = Math.floor(result5);                
        return String.valueOf(result5);
    }
}
